package com.chongjing.chat.domain;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.chongjing.common.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

//用来接受数据库查询结果的实体类
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MessageResponse {

    private String tableName; //根据时间动态获取表名
    private String excelNo;
    private int id;
    private long _mid;
    @Excel(name = "消息类型", readConverterExp = "0=私聊,1=群聊")
    private int _type;
    @Excel(name = "文本类型", readConverterExp = "2=语音,23=语音,1=文本,5=文件,3=图片,7=图片,6=文本")
    private int _content_type;
    @Excel(name = "发送者昵称")
    private String sender_name;
    @Excel(name = "接收者昵称")
    private String receiver_name;
    @Excel(name = "发送者id")
    private String sender_uid;
    @Excel(name = "接收者id")
    private String receiver_uid;//接收者id
    @Excel(name = "消息内容")
    private String _searchable_key;
    private byte[] _data;
    private String fileName;
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date _dt;
    private String midstr;


    private String content_type_text;
    private String type_text;

}
